#ifndef FORMVIDEO_H
#define FORMVIDEO_H

#include <QWidget>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QNetworkAccessManager>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>

#include <QList>
#include <QTimer>

#include <QCamera>
#include <QCameraImageCapture>
#include <QCameraInfo>
#include <QCameraViewfinder>
#include <QCameraImageCapture>

#include "arcsoft_face_sdk.h"
#include "amcomdef.h"
#include "asvloffscreen.h"
#include "merror.h"
#include <opencv2/opencv.hpp>

namespace Ui {
class FormVideo;
}

class FormVideo : public QWidget
{
    Q_OBJECT

public:
    explicit FormVideo(QWidget *parent = nullptr);
    ~FormVideo();
signals:
     void    switchF();
private slots:
    void updateTime();
    void requestFinished(QNetworkReply* );
    void on_pushButton_clicked();

private:
    Ui::FormVideo *ui;
    QCamera *myCamera;
    QCameraImageCapture *cp;
    QCameraViewfinder *vf;//
    void capturePic(int,const QImage &previe);
    IplImage *QImageToIplImage(const QImage & qImage);
    QImage *FormVideo::IplImageToQImage(IplImage *image);
    void CutIplImage(IplImage* src, IplImage* dst, int x, int y);
    void searchFaces(IplImage *img1);
    void FormVideo::show_facePic();
    QList<QString> devicenameList;
    QList<QString> devicedescripList;
};

#endif // FORMVIDEO_H
